package com.ad.pet.app.photo.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by z on.
 * Des:
 * Date: 2017/5/2
 */

public class PhotoItem implements Parcelable {
    private String compressUrl;
    private String originUrl;
    private String localPath;

    public PhotoItem(String compressUrl, String originUrl) {
        this.compressUrl = compressUrl;
        this.originUrl = originUrl;
    }

    public String getCompressUrl() {
        return compressUrl;
    }

    public void setCompressUrl(String compressUrl) {
        this.compressUrl = compressUrl;
    }

    public String getOriginUrl() {
        return originUrl;
    }

    public void setOriginUrl(String originUrl) {
        this.originUrl = originUrl;
    }

    public String getLocalPath() {
        return localPath;
    }

    public void setLocalPath(String localPath) {
        this.localPath = localPath;
    }

    @Override
    public String toString() {
        return "PhotoItem{" +
                "compressUrl='" + compressUrl + '\'' +
                ", originUrl='" + originUrl + '\'' +
                ", localPath='" + localPath + '\'' +
                '}';
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.compressUrl);
        dest.writeString(this.originUrl);
        dest.writeString(this.localPath);
    }

    protected PhotoItem(Parcel in) {
        this.compressUrl = in.readString();
        this.originUrl = in.readString();
        this.localPath = in.readString();
    }

    public static final Creator<PhotoItem> CREATOR = new Creator<PhotoItem>() {
        @Override
        public PhotoItem createFromParcel(Parcel source) {
            return new PhotoItem(source);
        }

        @Override
        public PhotoItem[] newArray(int size) {
            return new PhotoItem[size];
        }
    };
}

